﻿Imports System.Windows.Forms

Public Class Completion_Date

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click

        If TB_CompDate.Text <> "" Then
            If Not TB_CompDate.Text.Contains("/") Then
                MsgBox("Please enter date in format mm/dd/yyyy.", MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly)
            Else
                Me.DialogResult = System.Windows.Forms.DialogResult.OK
                NewRecord_Form.TB_CompDate.Text = TB_CompDate.Text
            End If
        Else
            Me.DialogResult = System.Windows.Forms.DialogResult.OK
            NewRecord_Form.TB_CompDate.Text = TB_CompDate.Text
        End If
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub BTN_Previous_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_Previous.Click
        CompDate_Prev = "Y"
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub BTN_Skip_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_Skip.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
    End Sub

    Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
        TB_CompDate.Text = DateTimePicker1.Value.Date
    End Sub

    Private Sub Completion_Date_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class
